<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function () {

    Route::get('/', ['uses' => 'HomeController@index', 'as' => 'admin.root']);

    Route::post('articles/destroys', ['uses' => 'ArticleController@destroys', 'as' => 'admin.articles.destroys']);

    Route::resource('article_categories', 'ArticleCategoryController', ['except' => ['show']]);

    Route::resource('articles', 'ArticleController', ['except' => ['show']]);

    Route::resource('product_categories', 'ProductCategoryController', ['except' => ['show']]);

    Route::resource('brands', 'BrandController', ['except' => ['show']]);

});

//Kindeditor
Route::group(['namespace' => 'Kindeditor'], function () {

    Route::resource('kindeditor', 'UploadController', ['only' => ['store']]);

});